package com.neouton.crm.managerPayPlan.service.impl;


import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mysql.cj.util.StringUtils;
import com.neouton.common.util.AuthUtils;
import com.neouton.common.util.PageUtil;
import com.neouton.common.util.ReportUtils;
import com.neouton.crm.dictionary.entity.DictionaryLookupItemVO;
import com.neouton.crm.dictionary.service.IDictionaryService;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.managerPayPlan.entity.ManagerPayPlan;
import com.neouton.crm.managerPayPlan.mapper.ManagerPayPlanMapper;
import com.neouton.crm.managerPayPlan.service.ManagerPaymentPlanService;
import com.neouton.crm.payRecords.entity.PaymentTable;
import com.neouton.crm.payRecords.mapper.PaymentRecordsMapper;
import com.neouton.crm.paymentPlan.entity.PaymentPlan;
import com.neouton.crm.paymentPlan.mapper.PaymentPlanMapper;
import com.neouton.crm.paymentPlan.service.PaymentPlanService;
import com.neouton.crm.receiptRecords.entity.ReceiptTable;
import com.neouton.crm.receiptRecords.mapper.ReceiptRecordsMapper;
import com.neouton.feginClient.FeginService;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.*;

/**
* @author Mose
* @description 针对表【payment_plan(付款计划)】的数据库操作Service实现
* @createDate 2023-01-12 16:25:52
*/
@Service
public class MangerPaymentPlanServiceImpl implements ManagerPaymentPlanService {

    @Resource
    private ManagerPayPlanMapper managerPayPlanMapper;

    @Resource
    private IDictionaryService dictionaryService;

    @Resource
    FeginService feginService;


    @Override
    public ManagerPayPlan queryPaymentPlanByPurchaseOrderID(ManagerPayPlan paymentPlan) {
        return managerPayPlanMapper.queryPaymentPlanByPurchaseOrderID(paymentPlan);
    }

    @Override
    public void updatePayPlansByIdAndPlanPeriod(List<ManagerPayPlan> paymentPlans) {
        if(paymentPlans.size()>0){
            managerPayPlanMapper.updatePayPlansByIdAndPlanPeriod(paymentPlans);
        }
    }
}
